import type { BusinessItemResult } from '@/types/business'
import request from '@/utils/request/request'

/**
 * 商家分页查询
 * @param params
 * @returns
 */
export const getBusinessPageAPI = (params: PageParams & { name?: string }) => {
  return request<PageResult<BusinessItemResult[]>>({
    method: 'GET',
    url: '/business/page',
    params: { ...params },
  })
}
/**
 * 根据id获取商家信息
 * @param id
 * @returns
 */
export const getBusinessAPI = (id: number) => {
  return request({
    method: 'GET',
    url: `/business/${id}`,
  })
}
